Fixed bug in small-depthbuffer version. Also added new optimization flags for release