DRY - fix random JS errors