small bug fixes

Here's some bug fixes in order to make work properly the extension.