fixed bug in latest commit, thanks Niphlod