bug fixing for the dev and production versions to work