fix bug reported by Marcus

http://wordpress.org/support/topic/found-and-fixed-bug-permalink-struktu
r