Fix for internal task
Further fix to the internal task
Another fix for internal process
small optimizations