Tested and fixed issues