some fixes
committing working version, tested with ulm and sf