final bugs fixed