added a little tweak to make it work