Fix illegal argument exception (#229)