Fix implementation of Parser.setProfile