Finally make it working, made a stupid mistake.

(Shouldn't code when it's late night probably...)