Fixed null pointer exception session