Bug Fix and moved function plugin to autoload