Made sure to not apply uniform properties unless neccessary. This solves the problem with deleted textures