bug fixed after testing