added compatibility for wp-8.1