bug fixes on laye rredraw