Fixed nullpointer error for Post view