bug fixing 518