Backport part of 5347394c20d47050034b59050c8e9402f2434434

Hello,

This is a backport from master for a bug that happens also on the Rails 2.x version, 0.3.2.

With this patch you might consider releasing 0.3.3.

bráulio