FIxed issue on scipt mode as well