fixed so not crashing if no posts