Major bug fixing done