fixes #5 (rails4 branch)