Added control logic to posts view to stop error in name class