Changed a few bugs