Fixed interface check in factory