Fix and test #247, #242

First attempt to Fix type overriden by listener even when user defined