Moved closed drawer function near timeout function.