Crankshaft gear just slips off?

How am i supposed to know how to line up my gears if my crankshaft gear just slides in a circle and is not even aligned with the crankshaft itself? I dont think its supposed to do this. There is a square divot in the gear and then a square valley in the crankshaft. Do those align? Please help.