Working on fixing #367 + misc stuff