Added a few bugs