bug fixing 466 and 476