Removed certain preconditions and fixed a bug