Added server check to validate direction