Fixes in imports and error decorator