Add more tests for corner cases, found one issue with large script