fixed bug

thx to @simplay for pointing it out.