Fixed postion of function (Previously caused plugin to crash)