fixed some wp functionality