fixed bad accesss