fixed a typo + added a micro optimization