Handler script generation bug fixes.