Fixed tests and added 3d support detection