Fixed all bugs in plugin