Some fix, need cleanup