Fixed a silly NullPointerException