Removed a couple of bugs