Test four different cases and bugs fixed from previous version