Fixing js to mark as checked