removed method which was not used, and added checks for method before it's called from a plugin