Fixed a bug where ambigious statements are not properly handled