Fix weird NullPointerException