Fix: crashes due to NullPointerException in views