Fixed NullPointerException further down