2 small bugfixes

Hey, I started using you plugin recently. Great work! Just found 2 small bug fixes.