Minor improvementes + bugfix