Fixed a few things (comments from Neamar on PR)