trap for invalid case. for debug