Some bug fixes

Plugin does still not work properly