fixing and some debug