Updated key prefix handling