Fixed it! I mixed up x and y during initialization.