Simple error handeling to avoid div 0