Fixed a few bugs concerning the pull request
Fixed some merge madness