delete function working but only after refresh, posts limitTo deleted