Some bug fixing left