Had some issues with the local scope