Enabled StrictMode and fixed some errors found by it