Fix bugs when changin select all checkbox and minor changes