Whoops, fixed a null pointer error.