Corrected bugs. Set Shape check_input to false.