fixed Undefined offset error
added priority and data paramters for error widget