all the bug fixing