bug fixed for bring to front