general fixes, resolved merge conflict