minor performance fixes + fixed typo in comment - thx  XhmikosR  :)