Fixed bug
Made improvements