fixed bug with overlay