fixed bugs, works find :)