Fix atan2

Fix the derivates of the atan2 function.