Fixed bugs, not working yet