cast-bugs fixed