fixed little bugs and warnings