Fixed: A few bugs