fixed a crash due to input type