Fix layout padding and stop properly handle HTTP errors