Removed some debug + fixed some checks