visiblePages passed to directive is now properly cast to int

Fixes #8