bug fixing 509