Fix undefined variables when looking for id