Bugfixes and improvements

Added flag defaults