Problem fixes + some error handling