Fixed DB bug
Added __check_plugin for plugin manager