some small bugs fixed to allow deploy