Modifications to fix createAssignment