Lots of errors are made with sub panels. I inspect houses for a living and see it all so here is some advice.....

Sub Panels must be fed with a 4 conductor cable. The neutrals and grounds must be on seperate busses. This is known as "floating neutral". Only the ground bus can be bonded to the metal box with the (usually)green screw. Also the neutral wires must be connected seperate under each screw, no double tapping allowed on hots or neutrals. The exception for hot wires is on the breakers designed for two wires. The way to tell if it is designed for two wires is that the wires do not touch each other when installed on the breaker. FYI, the correct term is "panel" but I like sub panel since everyone knows what they are. Technically you only have "main panels" or otherwise known as "service equipment" and then all else is just a "panel". The only place where the neutrals and grounds are connected together is at the service equipment or main panel.