More bugs
More small fixes found during testing related to references