minor type bugs fixed