fixed conditional for editing post