Better ref handling
Fix modals