Small fixes

Maybe add a comment here explaining why this is needed?