Fixed rare bug resulting in infinite loop during tower generation