tests and bugfixes

FIXME: exception on parser...