bug fixing and confirm box