fixed some bugs, works now :)