Fixed: Wrong variable usage + typo (Thank to mrpink)