Fixing few bugs from latest commit

sorry was to quick to send over