fixes and tool scripts