Changed size check, now it works