update to work in wp3.8 without errors, bug fixes