Fixed npe, should be good now