code bugs fixed