Bugfixes

Cleanup bugfix.
Flags bugfix
Merge pull request #26 from GrafSeismo/master

Bugfixes