haskell #6
fixes for haskell #1 and #4