fixing some more bugs -- working on backwards-compatibility afterwards