Fixed post view to check if the post exists, otherwise it will throw an uncaught exception