Fixed issue #171 for real this time (again, redsaurus' idea)