Corrected a bug in the build and plugin

Not far from making this thing work.
There was a problem with phase names in the plugin