Fixed bounds checking again on fogId.